using UnityEngine;
namespace NL.Advanced
{


    public class CameraOffsetRequest : MonoBehaviour
    {


        public Vector2 Offset = Vector3.one * 0.1f;
        public float RequestDelay = 0.1f;
        protected virtual void OnEnable()
        {
            Invoke("_DoRequest", RequestDelay);
        }

        protected virtual void _DoRequest()
        {
            CameraController.LOOK_OFFSET(Offset);
        }

        protected virtual void OnDisable()
        {
            CancelInvoke();
            CameraController.LOOK_OFFSET(Vector2.zero);
        }
    }
}

